<?php
/* @var $this PurchaseController */
/* @var $model Purchase */
/* @var $form BSActiveForm */
?>

<?php
BSHtml::$formLayoutHorizontalLabelClass = 'col-lg-3';
BSHtml::$formLayoutHorizontalControlClass = 'col-lg-6';
?>
<?php $form=$this->beginWidget('bootstrap.widgets.BsActiveForm', [
	'id'=>'purchase-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
	'layout' => BSHtml::FORM_LAYOUT_HORIZONTAL,
	'htmlOptions'=>['class'=>'row-border'],
]); ?>

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-midnightblue">
			<div class="panel-heading">
				<h4>表单元素</h4>
			</div>
			<div class="panel-body">
				<div class="form">
					
				    <p class="help-block" style="margin-bottom:20px"><span class="required">*</span> 为必填字段.</p>
				
				    <?php echo $form->errorSummary($model); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'no',array('maxlength'=>20)); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'pid'); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'buytime'); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'goodid'); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'goods',array('maxlength'=>50)); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'model',array('maxlength'=>20)); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'price',array('maxlength'=>10)); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'num'); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'supplier',array('maxlength'=>50)); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'ispay'); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'isinvoice'); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'applyid'); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'apply',array('maxlength'=>50)); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'buyid'); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'buyname',array('maxlength'=>50)); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'arrivaltime'); ?>
				
				    				        <?php echo $form->textAreaControlGroup($model,'desc',array('rows'=>6)); ?>
				
				    				        <?php echo $form->textFieldControlGroup($model,'isdel'); ?>
				
				    				        
				
				</div><!-- form -->
			</div> <!-- end panel-body -->
			
			<div class="panel-footer">
	            <div class="row">
	                <div class="col-sm-6 col-sm-offset-3">
	                    <div class="btn-toolbar">
	                        <?php echo BSHtml::submitButton('提交', ['color' => BSHtml::BUTTON_COLOR_PRIMARY]); ?>
						    <a class="btn btn-default" href="<?php echo $this->createUrl('admin')?>">取消</a>
	                    </div>
	                </div>
	            </div>
	        </div>
			
		</div>
	</div>
</div> <!-- end row -->
<?php $this->endWidget()?>